﻿namespace DataServer.CommonLib.Constants
{
    public static class ApiRoutes
    {
        private const string Root = "api";
        private const string Version = "v1";
        private const string Base = Root + "/" + Version;

        public static class Database
        {
            public const string QueryDatabases = Base + "/databases";

            public const string DeleteDatabase = Base + "/databases/{id}";

            public const string UpdateDatabase = Base + "/databases/{id}";

            public const string CreateDatabase = Base + "/databases";

            public const string GetDatabase = Base + "/databases/{id}";

            public const string ConnDatabase = Base + "/databases/conn/{id}";
        }

        public static class DataSource
        {
            public const string QueryDataSources = Base + "/datasources";

            public const string DeleteDataSource = Base + "/datasources/{id}";

            public const string UpdateDataSource = Base + "/datasources/{id}";

            public const string CreateDataSource = Base + "/datasources";

            public const string GetDataSource = Base + "/datasources/{id}";
        }

        public static class Dimension
        {
            public const string QueryDimensions = Base + "/dimensions";

            public const string DeleteDimension = Base + "/dimensions/{id}";

            public const string UpdateDimension = Base + "/dimensions/{id}";

            public const string CreateDimension = Base + "/dimensions";

            public const string GetDimension = Base + "/dimensions/{id}";

            public const string BatchOptDimension = Base + "/dimensions/batch";

            public const string TestDimension = Base + "/dimensions/test";
        }
    
        public static class DataConfig
        {
            public const string QueryDataConfigs = Base + "/dataconfigs";

            public const string DeleteDataConfig = Base + "/dataconfigs/{id}";

            public const string UpdateDataConfig = Base + "/dataconfigs/{id}";

            public const string CreateDataConfig = Base + "/dataconfigs";

            public const string GetDataConfig = Base + "/dataconfigs/{id}";

            public const string QueryAvailableColumns = Base + "/dataconfigs/availableColumn/{dataType}";

            public const string QueryFields = Base + "/dataconfigs/{configCode}/fields";

            public const string CreateField = Base + "/dataconfigs/{configCode}/fields";

            public const string GetField = Base + "/dataconfigs/fields/{id}";
        
            public const string UpdateField = Base + "/dataconfigs/fields/{id}";
        
            public const string QueryRules = Base + "/dataconfigs/{configCode}/rules";

            public const string CreateRule = Base + "/dataconfigs/{configCode}/rules";
        }
    }
}